/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */
#ifndef PLTASKSTATESEGMENT_H
#define PLTASKSTATESEGMENT_H

#include <stddef.h>
using namespace std;

/**
 * The protected mode task state segment.
 */
struct TaskStateSegment {
	uint16_t link;
	uint16_t res0;
	uint32_t esp0;
	uint16_t ss0;
	uint16_t res1;
	uint32_t esp1;
	uint16_t ss1;
	uint16_t res2;
	uint32_t esp2;
	uint16_t ss2;
	uint16_t res3;
	uint32_t cr3;
	uint32_t eip;
	uint32_t eflags;
	uint32_t eax;
	uint32_t ecx;
	uint32_t edx;
	uint32_t ebx;
	uint32_t esp;
	uint32_t ebp;
	uint32_t esi;
	uint32_t edi;
	uint16_t es;
	uint16_t res4;
	uint16_t cs;
	uint16_t res5;
	uint16_t ss;
	uint16_t res6;
	uint16_t ds;
	uint16_t res7;
	uint16_t fs;
	uint16_t res8;
	uint16_t gs;
	uint16_t res9;
	uint16_t ldt;
	uint16_t res10;
	uint16_t res11;
	uint16_t ioPermBitmap;
} PACKED;

#endif // PLTASKSTATESEGMENT_H
